package com.liy.framework.common.thread;

import org.springframework.boot.context.properties.*;

@ConfigurationProperties(prefix = "dascloud.thread.pool")
public class TaskThreadPoolConfig
{
    private int corePoolSize;
    private int maxPoolSize;
    private int keepAliveSeconds;
    private int queueCapacity;
    
    public TaskThreadPoolConfig() {
        this.corePoolSize = 5;
        this.maxPoolSize = 20;
        this.keepAliveSeconds = 5000;
        this.queueCapacity = 100;
    }
    
    public int getCorePoolSize() {
        return this.corePoolSize;
    }
    
    public void setCorePoolSize(final int corePoolSize) {
        this.corePoolSize = corePoolSize;
    }
    
    public int getMaxPoolSize() {
        return this.maxPoolSize;
    }
    
    public void setMaxPoolSize(final int maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }
    
    public int getKeepAliveSeconds() {
        return this.keepAliveSeconds;
    }
    
    public void setKeepAliveSeconds(final int keepAliveSeconds) {
        this.keepAliveSeconds = keepAliveSeconds;
    }
    
    public int getQueueCapacity() {
        return this.queueCapacity;
    }
    
    public void setQueueCapacity(final int queueCapacity) {
        this.queueCapacity = queueCapacity;
    }
}
